Release 10.1A: OpenEdge Data Management:
SQL Reference
UPDATE
Updates the rows and columns of the specified table with the given values for rows that satisfy the search_condition.
Syntax
assignment:This is the syntax for
assignment:
Notes
Examples
- If you specify the optional
WHEREclause, only rows that satisfy the search_condition are updated. If you do not specify aWHEREclause, all rows of the table are updated.- If the expressions in the
SETclause are dependent on the columns of the target table, the expressions are evaluated for each row of the table.- If a query expression is specified on the right-hand side of an assignment, the number of expressions in the first
SELECTclause of the query expression must be the same as the number of columns listed on the left-hand side of the assignment.- If a query expression is specified on the right-hand side of an assignment, the query expression must return one row.
- If a table has check constraints and if the columns to be updated are part of a check expression, then the check expression is evaluated. If the result of the evaluation is
FALSE, theUPDATEstatement fails.- If a table has primary or candidate keys and if the columns to be updated are part of the primary or candidate key, SQL checks to determine if there is a corresponding row in the referencing table. If there is a corresponding row the
UPDATEoperation fails.- Column names in the
SETclause do not need a table_name qualifier. Since anUPDATEstatement affects a single table, columns in theSETclause are implicitly qualified to the table_name identified in theUPDATEclause.
Authorization
Must have
DBAprivilege orUPDATEprivileges on all the specified columns of the target table, andSELECTprivilege on all the other tables referred to in the statement.Related statements
SELECT, OPEN, FETCH
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |